<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>学IT - 后台管理系统</title>
    <?php include "/views/public/css.html"?>
    <link rel="stylesheet" href="/views/assets/bootstrap-datepicker/css/bootstrap-datepicker3.css">
</head>

<body>

    <!-- 侧边栏 -->
    <?php include "/views/public/aside.html"?>
    <!-- 主体 -->
    <div class="main">
        <div class="container-fluid">
            <!-- 头部 -->
            <?php include "/views/public/header.html"?>
            <div class="body teacher">

            </div>
        </div>
    </div>

    <script type="text/template" id="manage-tpl">
        <!-- 面包屑 -->
        <ol class="breadcrumb">
            <li><a href="javascript:;">讲师管理</a></li>
            <li class="active">{{title}}</li>
        </ol>
        <div class="teacher-add">
            <form action="{{url}}" method="post" class="form-horizontal col-xs-offset-2">
                <input type="hidden" name="tc_id" value="{{teacher.tc_id}}">   
                <div class="form-group">
                    <label for="" class="col-xs-3 control-label">姓名</label>
                    <div class="col-xs-4">
                        <input type="text" name="tc_name" value="{{teacher.tc_name}}" class="form-control input-sm" placeholder="讲师名称" data-required data-conditional="forbidden" data-description="name" data-describedby="msgforname">
                    </div>
                    
                    <label id="msgforname" style="text-align:left" class="col-xs-3 control-label"></label>
                </div>
                {{if !teacher.tc_id}}
                <div class="form-group">
                    <label for="" class="col-xs-3 control-label">密码</label>
                    <div class="col-xs-4">
                        <input type="password" name="tc_pass" value="{{teacher.tc_pass}}" class="form-control input-sm" data-required data-pattern="^[0-9A-Za-z]{6,15}$" data-description="pass" data-describedby="msgforpass">
                    </div>
                    <label id="msgforpass" style="text-align:left" class="col-xs-3 control-label"></label>
                </div>
                {{/if}}
                <div class="form-group">
                    <label for="" class="col-xs-3 control-label">入职时间</label>
                    <div class="col-xs-4">
                        <input type="text" name="tc_join_date" value="{{teacher.tc_join_date}}" data-required class="form-control input-sm" data-description="joindate" data-describedby="msgfordate">
                    </div>
                    <label id="msgfordate" style="text-align:left" class="col-xs-3 control-label"></label>
                </div>
                <div class="form-group">
                    <label for="" class="col-xs-3 control-label">类型</label>
                    <div class="col-xs-2">
                        <select name="tc_type" class="form-control input-sm">
                            <option value="1" {{teacher.tc_type == "1" ? "selected" : ""}}>讲师</option>
                            <option value="0" {{teacher.tc_type == "0" ? "selected" : ""}}>管理员</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="" class="col-xs-3 control-label">性别</label>
                    <div class="col-xs-4">
                        <label class="radio-inline">
                            <input type="radio" name="tc_gender" {{teacher.tc_gender == "0" ? "checked" : ""}} value="0"> 男
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="tc_gender" {{teacher.tc_gender == "1" ? "checked" : ""}} value="1"> 女
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-xs-7">
                        <button class="btn btn-success btn-sm pull-right"> {{buttonText}} </button>
                    </div>
                </div>
            </form>
        </div>
    </script>

    <?php include "/views/public/js.html"?>
    <script>
        // baseUrl: /views/assets
        require(["../static/js/teacher/manage"])
    </script>
</body>

</html>